#pragma once

#include "jtag.h"
#include "commands.h"

class tapc
{
public:
    tapc();

public:
    tap_state_t tap_get_end_state();
    tap_state_t tap_get_state();
    int tap_get_tms_path(tap_state_t from, tap_state_t to);
    int tap_move_ndx(tap_state_t astate);
    void tap_set_state(tap_state_t new_state);
    const char *tap_state_name(tap_state_t state);
    tap_state_t tap_state_transition(tap_state_t cur_state, bool tms);
    void tap_set_end_state(tap_state_t new_end_state);
    int tap_get_tms_path_len(tap_state_t from, tap_state_t to);
    bool tap_is_state_stable(tap_state_t astate);

private:
    tap_state_t end_state_follower;
    tap_state_t state_follower;
};
